package com.soonoh.simplecube;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;

public class SimpleCubeActivity extends Activity implements OnClickListener {
	   private static final String TAG = "Sudoku";
	   
	   /** Called when the activity is first created. */
	   @Override
	   public void onCreate(Bundle savedInstanceState) {
	      super.onCreate(savedInstanceState);
	      setContentView(R.layout.main);

	      // Set up click listeners for all the buttons
	      View continueButton = this.findViewById(R.id.continue_button);
	      continueButton.setOnClickListener(this);
	      View newButton = this.findViewById(R.id.new_button);
	      newButton.setOnClickListener(this);
	      View aboutButton = this.findViewById(R.id.about_button);
	      aboutButton.setOnClickListener(this);
	      View exitButton = this.findViewById(R.id.exit_button);
	      exitButton.setOnClickListener(this);
	   }

	   
	   @Override
	   protected void onResume() {
	      super.onResume();
	   }

	   @Override
	   protected void onPause() {
	      super.onPause();
	   }
	   

	   
	   public void onClick(View v) {
	      switch (v.getId()) {
	      case R.id.continue_button:
//	         startGame(Game.DIFFICULTY_CONTINUE);
	         break;
	         // ...
	         
	      case R.id.about_button:
//	         Intent i = new Intent(this, About.class);
//	         startActivity(i);
	         break;
	      // More buttons go here (if any) ...
	      case R.id.new_button:
	         startGame();
	         break;
	      case R.id.exit_button:
	         finish();
	         break;
	         
	      }
	   }
	   
	   
//	   @Override
//	   public boolean onCreateOptionsMenu(Menu menu) {
//	      super.onCreateOptionsMenu(menu);
//	      MenuInflater inflater = getMenuInflater();
//	      inflater.inflate(R.menu.menu, menu);
//	      return true;
//	   }

//	   @Override
//	   public boolean onOptionsItemSelected(MenuItem item) {
//	      switch (item.getItemId()) {
//	      case R.id.settings:
//	         startActivity(new Intent(this, Settings.class));
//	         return true;
//	      // More items go here (if any) ...
//	      }
//	      return false;
//	   }

	   /** Start a new game with the given difficulty level */
	   private void startGame() {
	      Log.d(TAG, "start game ");
	      Intent intent = new Intent(SimpleCubeActivity.this, CubeGame.class);
	      startActivity(intent);
	   }
}